<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id')->comment('自增id');
            $table->string('name')->comment('用户名');
            $table->integer('mobile')->default(0)->comment('手机号码');
            $table->string('password')->default('')->nullable()->comment('密码');
            $table->tinyInteger('sex')->comment('性别');
            $table->string('head_pic')->comment('头像');
            $table->string('nickname')->nullable(false)->comment('第三方返回昵称');
            $table->string('push_id')->default('')->nullable()->comment('推送id');
            $table->string('xcx_qrcode')->default('')->nullable()->comment('小程序专属二维码');
            $table->string('mp_qrcode')->default('')->nullable()->comment('公众号专属二维码');
            $table->string('poster')->default('')->nullable()->comment('专属推广海报');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
